<template>
<div class="view-home">
	<test-select v-model="condiData.sex1">
		<test-option v-for="data in sexList1" :value="data.value" :key="data.value">{{ data.label }}</test-option>
	</test-select>
	<test-select v-model="condiData.sex2">
		<test-option v-for="data in sexList2" :value="data.id" :key="data.id">{{ data.name }}</test-option>
	</test-select>
	<el-select v-model="condiData.sex3">
		<el-option v-for="data in sexList1" :value="data.value" :key="data.value">{{ data.label }}</el-option>
	</el-select>
</div>
</template>

<script>
// @ is an alias to /src
import Select from '@/components/Select.vue'

export default {
	name: 'Test',
	components: {
		'test-select': Select,
	},
	data () {
		return {
			test: {
				top: 100,
				left: 200,
			},
			// 查询-查询条件
            condiData: {
                sex1: '',
                sex2: '',
                sex3: '',
            },
            // 下拉列表-性别
            sexList1: [{
                value: '1',
                label: '男'
            },{
                value: '2',
                label: '女'
            }],
            // 下拉列表-是否
            sexList2: [{
                id: '1',
                name: '是'
            },{
                id: '0',
                name: '否'
            }],
		};
	},
	beforeRouteEnter (to, from, next) {
		console.log('beforeEnter:home:组件内');
		next();
	},
	mounted () {
        console.log('ExampleList1:');
        console.log(this.$storeTest);
    },
}
</script>
